﻿<%@ Page Title="Class Availiable Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ClassAvailProducts.aspx.cs" Inherits="IFD2.ClassAvailProducts" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <%--<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>--%>
    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
        </div>

        <div class="col-sm-10 well well-sm">
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" style="min-width:1400px;width:100%;">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                    <input name="KEY" type="radio" value='<%# Eval("airline")+"|"+Eval("code")%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="airline" HeaderText="airline" SortExpression="airline"  meta:resourcekey="airline" />
                                <asp:BoundField DataField="code" HeaderText="code" SortExpression="code"  meta:resourcekey="code" />
                                <asp:BoundField DataField="cabin" HeaderText="cabin" SortExpression="cabin"  meta:resourcekey="cabin" />
                                <asp:BoundField DataField="seg_total" HeaderText="seg_total" SortExpression="seg_total"  meta:resourcekey="seg_total" />
                                <asp:BoundField DataField="seats_min" HeaderText="seats_min" SortExpression="seats_min"  meta:resourcekey="seats_min" />
                                <asp:BoundField DataField="begin_date" HeaderText="begin_date" SortExpression="begin_date"  meta:resourcekey="begin_date" />
                                <asp:BoundField DataField="end_date" HeaderText="end_date" SortExpression="end_date"  meta:resourcekey="end_date" />
                                <asp:BoundField DataField="fltdate_from" HeaderText="fltdate_from" SortExpression="fltdate_from"  meta:resourcekey="fltdate_from" />
                                <asp:BoundField DataField="fltdate_to" HeaderText="fltdate_to" SortExpression="fltdate_to"  meta:resourcekey="fltdate_to" />
                                <asp:BoundField DataField="open_advance" HeaderText="open_advance" SortExpression="open_advance"  meta:resourcekey="open_advance" />
                                <asp:BoundField DataField="close_advance" HeaderText="close_advance" SortExpression="close_advance"  meta:resourcekey="close_advance" />
                                <asp:BoundField DataField="week_mask" HeaderText="week_mask" SortExpression="week_mask"  meta:resourcekey="week_mask" />
                                <asp:BoundField DataField="stay_min" HeaderText="stay_min" SortExpression="stay_min"  meta:resourcekey="stay_min" />
                                <asp:BoundField DataField="stay_max" HeaderText="stay_max" SortExpression="stay_max"  meta:resourcekey="stay_max" />
                            </Columns>
                            <RowStyle BackColor="#EFF3FB" />
                            <EditRowStyle BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>

                        <asp:HiddenField ID="hidFltNo" runat="server" />
                        <asp:HiddenField ID="hidFltDate" runat="server" />
                        <asp:HiddenField ID="hidOri" runat="server" />
                        <asp:HiddenField ID="hidDes" runat="server" />
                        <asp:HiddenField ID="hidClass" runat="server" />
                        <asp:HiddenField ID="hidPlanID" runat="server" />
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            SelectCommand="bll_flt_get_class_associated_fares" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                                <asp:ControlParameter ControlID="hidFltNo" Name="flt_no" PropertyName="Value" Type="String" />
                                <asp:ControlParameter ControlID="hidPlanID" Name="plan_id" PropertyName="Value" Type="String" />
                                <asp:ControlParameter ControlID="hidFltDate" Name="flt_date" PropertyName="Value" Type="DateTime" />
                                <asp:ControlParameter ControlID="hidOri" Name="ori_airport" PropertyName="Value" Type="String" />
                                <asp:ControlParameter ControlID="hidDes" Name="des_airport" PropertyName="Value" Type="String" />
                                <asp:ControlParameter ControlID="hidClass" Name="class" PropertyName="Value" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>

                    <div class="btn-group">
                        <asp:Button ID="btnTrip" runat="server" CssClass="btn btn-sm btn-default" Text="Trip..." OnClick="btnTrip_Click"  meta:resourcekey="Trip" />
                        <asp:Button ID="btnRules" runat="server" CssClass="btn btn-sm btn-default" Text="Rules..." OnClick="btnRules_Click"  meta:resourcekey="Rules" />
                        <asp:Button ID="btnOffices" runat="server" CssClass="btn btn-sm btn-default" Text="Offices..." OnClick="btnOffices_Click"  meta:resourcekey="Offices" />
                    </div><br />
                    <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label>
                </div>
            </div>
        </div>
    </div>

    </div>
    <%--</ContentTemplate></asp:UpdatePanel>--%>
    </form>
</asp:Content>
